home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / Makefile.in < prev    next >
Makefile  |  1993-09-15  |  11KB  |  286 lines

  1. ############################################################
  2. #
  3. # GNUPLOT 3.4 Makefile (Unix X11 support)
  4. # Adapted from makefile.unx by djm@gnu.ai.mit.edu
  5. ############################################################
  6.  
  7. .NOEXPORT:
  8. SHELL = /bin/sh
  9.  
  10. srcdir = @srcdir@
  11. VPATH = @srcdir@
  12.  
  13. prefix = /usr/local
  14. exec_prefix = $(prefix)
  15. bindir = $(exec_prefix)/bin
  16. datadir = $(prefix)/lib
  17. mandir = $(prefix)/man/man1
  18.  
  19. INSTALL = @INSTALL@
  20. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  21. INSTALL_DATA = @INSTALL_DATA@
  22.  
  23. CC     = @CC@
  24. DEFS   = @DEFS@ @X_INCLUDES@
  25. CFLAGS = -O2
  26. LDFLAGS = -s
  27.  
  28. # Additional devices you can add.
  29. # -DAPOLLO      Apollo Graphics Primitive Resource (window resize after replot)
  30. # -DGPR         Apollo Graphics Primitive Resource (fixed-size window)
  31. # -DCGI         SCO CGI
  32. # -DIRIS4D      IRIS4D series computer
  33. # -DSUN         Sun Microsystems Workstation
  34. # -DUNIXPC      unixpc (ATT 3b1 or ATT 7300)
  35. # -DUNIXPLOT    unixplot
  36. # -DGNUGRAPH    use GNU graphics version of UNIX plot library
  37. #               This can only be used in combination with -DUNIXPLOT
  38. TERMFLAGS = 
  39.  
  40. #  -lplot if you have -DUNIXPLOT in TERMFLAGS
  41. #  -lsuntool -lsunwindow -lpixrect  if you have -DSUN in TERMFLAGS
  42. #  -lgl_s if -DIRIS4D in TERMFLAGS
  43. #  -lccgi if -DCGI in TERMFLAGS
  44. TERMLIBS = 
  45.  
  46. LIBS = $(TERMLIBS) @X_LIBRARIES@ -lm @LIBS@
  47.  
  48. # Where to send email about bugs and comments (locally)
  49. EMAIL=bug-gnuplot@dartmouth.edu
  50.  
  51. # Lasergnu is a handy shell script for creating a plot from the
  52. # command line and sending it directly to the printer. It currently
  53. # supports PostScript and imagen printers, and probably would need
  54. # tailoring to your site.
  55. # Use lasergnu_install to install lasergnu.
  56. # Use lasergnu_noinstall to not install lasergnu (default).
  57. LASERGNU = @LASERGNU@
  58.  
  59. ############################################################
  60. # -DREADLINE:
  61. #   If READLINE is defined, then command-line editing is supported.
  62. #   Otherwise, your normal terminal editing is all you get.
  63. #   Some machines will not support this, and they will turn this
  64. #   option off (for example, apollos running SR10.2 or SR10.3 and
  65. #   loaded with BSD4.3 instead of SYS5). Note: problems with
  66. #   gnuplot prompts have been noted when this feature is selected
  67. #   on IBM RS/6000 AIX, and compile errors are encountered on
  68. #   Sequent Dynix 3 and Convex OS 9.0.
  69. # -DNOCWDRC:
  70. #   If NOCWDRC is defined, then any .gnuplot in the current directory
  71. #   is not read on startup. This is a security consideration
  72. #   especially for root users ( we recommend you define -DNOCWDRC ).
  73.  
  74. # -DOLD_SELECT if you have an old 4.2 BSD OS (e.g. Sun OS 3.5) and
  75. #   encounter compile error for missing FD_* macros for select
  76. # -DBSD_TYPES if your system defines FD_* macros for select in
  77. #   <sys/bsdtypes.h>
  78. # -ISC22 to circumvent missing plots past the first on ISC 2.2
  79.  
  80. #  -DNOVFORK if you're unix and you have don't have vfork()
  81. #  -DMEMSET if you need to use memset() instead of bzero()
  82. #  -DMEMCPY if your bcopy() is called memcpy()
  83. #  -DNOCOPY if you don't have a memcpy() by any name
  84. #  -DGAMMA=foo if your gamma function is called foo(). Apollos have
  85. #    lgamma(3m). The default is -DGAMMA=gamma.
  86. #  -DGETCWD if your unix uses getcwd() instead of getcd()
  87. #    this is needed by HP-UX and Cray Unicos systems.
  88. #  -DULTRIX_KLUDGE if you run X windows on Ultrix and experience the
  89. #    "every other plot" problem.
  90. #  -DCRIPPLED_SELECT if "select errors" are encountered with X. This
  91. #    option is needed on SVR3 platforms with incomplete support for
  92. #    the BSD select() system call
  93. #  -DXPG3_LOCALE if your system uses the 'setlocale' function to
  94. #    support foreign charactersets (currently only ISO8859-1).
  95. #  -Dunix is required to explicitly define "unix" for SCO and IBM
  96. #          RS/6000 running AIX 3.2
  97.  
  98. #
  99. # You probably don't need to change anything below here.
  100. #
  101.  
  102. ####################################################################
  103. # List of object files except version.o
  104. OBJS = bitmap.o command.o contour.o eval.o graphics.o graph3d.o help.o \
  105.        internal.o misc.o parse.o plot.o readline.o scanner.o \
  106.        setshow.o specfun.o standard.o term.o util.o gnubin.o binary.o
  107.  
  108. ####################################################################
  109. # List of source files
  110. # Used for making shar files, lint, and some dependencies.
  111. DIRS = term demo docs docs/latextut
  112.  
  113. CSOURCE1 = bf_test.c binary.c command.c setshow.c
  114. CSOURCE2 = help.c gnubin.c graphics.c graph3d.c internal.c
  115. CSOURCE3 = misc.c eval.c parse.c plot.c readline.c scanner.c standard.c
  116. CSOURCE4 = bitmap.c term.c util.c version.c
  117. CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \
  118.     term/bigfig.trm term/cgi.trm term/corel.trm \
  119.     term/djsvga.trm term/dumb.trm \
  120.     term/dxf.trm term/dxy.trm term/debug.trm \
  121.     term/emxvga.trm term/eepic.trm term/epson.trm term/excl.trm \
  122.     term/fig.trm term/grass.trm term/hp26.trm term/hp2648.trm term/hpgl.trm \
  123.     term/hp500c.trm term/hpljii.trm term/metafont.trm \
  124.     term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c
  125. CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
  126.     term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
  127.     term/pbm.trm term/pslatex.trm term/gpic.trm
  128. CSOURCE7 = term/post.trm term/pstricks.trm term/qms.trm term/regis.trm \
  129.     term/rgip.trm term/sun.trm \
  130.     term/t410x.trm term/tek.trm term/texdraw.trm term/tgif.h \
  131.     term/tgif.trm term/tpic.trm \
  132.     term/unixpc.trm term/unixplot.trm \
  133.     term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
  134. CSOURCE8 = contour.c specfun.c gplt_x11.c
  135. NEXTSRC  = epsviewe.m epsviewe.h
  136. # not C code, but still needed
  137.  
  138. DEMOS = demo/1.dat demo/2.dat demo/3.dat demo/contours.dem \
  139.     demo/controls.dem demo/electron.dem demo/glass.dat demo/param.dem \
  140.     demo/polar.dem demo/simple.dem demo/surface1.dem \
  141.     demo/surface2.dem demo/using.dat demo/using.dem demo/world.cor \
  142.     demo/world.dat demo/world.dem \
  143.     demo/err.dat demo/poldat.dem demo/polar.dat demo/errorbar.dem \
  144.     demo/antenna.dat demo/all.dem demo/animate.dem demo/bivariat.dem \
  145.     demo/prob.dem demo/stat.inc demo/prob2.dem demo/random.dem \
  146.     demo/discrete.dem demo/hidden.dem demo/airfoil.dem demo/gnuplot.rot\
  147.     demo/binary.dem demo/spline.dem demo/steps.dem demo/steps.dat \
  148.     demo/multimsh.dem demo/whale.dat demo/hemisphr.dat \
  149.     demo/scatter.dem demo/scatter2.dat demo/singulr.dem demo/klein.dat
  150.  
  151. ETC = Copyright 0README README.gnu README.ami makefile.unx makefile.vms \
  152.     linkopt.amg makefile.amg makefile.ami linkopt.vms buildvms.com \
  153.     lasergnu makefile.r makefile.nt makefile.g 0FAQ 0BUGS\
  154.     term/README History gnuplot.el intergra.x11 0INSTALL\
  155.     README.3p2 README.3p3 README.3p4 README.pro README.nex README.x11 \
  156.     README.3d README.mf README.win configure configure.in Makefile.in
  157.  
  158. #BETA files (not standard distribution files)
  159. BETA = BETA
  160. # PC-specific files
  161. PC = corgraph.asm corplot.c header.mac hrcgraph.asm lineproc.mac \
  162.     linkopt.msc makefile.msc makefile.tc makefile.st makefile.djg \
  163.     pcgraph.asm gnuplot.def makefile.286 gnuplot.prj makefile.emx \
  164.     makefile.ztc linkopt.ztc term/fg.trm term/pc.trm
  165. WINDOWS = makefile.win makefile.msw README.win win/wcommon.h \
  166.     win/wgnuplib.c win/wgnuplib.def win/wgnuplib.h win/wgnuplib.rc \
  167.     win/wgnuplot.def win/wgnuplot.hpj win/wgnuplot.mnu win/wgnuplot.rc \
  168.     win/wgraph.c win/winmain.c win/wmenu.c win/wpause.c \
  169.     win/wprinter.c win/wresourc.h win/wtext.c win/wtext.h \
  170.     win/geticon.c docs/doc2rtf.c term/win.trm
  171. OS2 = makefile.os2 os2/makefile os2/dialogs.c os2/dialogs.h os2/gclient.c \
  172.     os2/gnuicon.uue os2/gnupmdrv.c os2/gnupmdrv.def os2/gnupmdrv.h \
  173.     os2/gnupmdrv.itl os2/gnupmdrv.rc os2/print.c docs/doc2ipf.c \
  174.     README.os2 term/pm.trm
  175.  
  176. # Documentation and help files
  177. DOCS1 = docs/makefile.org docs/README docs/checkdoc.c docs/doc2gih.c \
  178.     docs/doc2hlp.c docs/doc2hlp.com docs/doc2ms.c docs/doc2tex.c \
  179.     docs/gnuplot.1 docs/lasergnu.1 docs/toc_entr.sty docs/doc2info.pl \
  180.     docs/titlepag.ms docs/titlepag.tex docs/makefile.ami \
  181.     docs/doc2rtf.c docs/Makefile.in
  182. DOCS2 = docs/gnuplot.doc docs/gpcard.tex
  183. DOCS3 = docs/latextut/makefile.org docs/latextut/eg1.plt \
  184.     docs/latextut/eg2.plt docs/latextut/eg3.dat docs/latextut/eg3.plt \
  185.     docs/latextut/eg4.plt docs/latextut/eg5.plt docs/latextut/eg6.plt \
  186.     docs/latextut/header.tex docs/latextut/tutorial.tex \
  187.     docs/latextut/linepoin.plt docs/latextut/Makefile.in
  188.  
  189. #########################################################################
  190.  
  191. all: gnuplot @PROGS@ doc
  192.  
  193. gnuplot: $(OBJS) version.o
  194.     $(CC) -o $@ $(OBJS) version.o $(LDFLAGS) $(LIBS)
  195.  
  196. doc:
  197.     ( cd docs; $(MAKE) $(MFLAGS) gnuplot.gih )
  198.  
  199. gnuplot_x11: gplt_x11.o
  200.     $(CC) -o $@ gplt_x11.o $(LDFLAGS) $(LIBS)
  201.  
  202. check: all demo/binary1
  203.  
  204. demo/binary1 demo/binary2 demo/binary3: bf_test
  205.     ( wd=`pwd`; cd $(srcdir)/demo; $$wd/bf_test )
  206.  
  207. bf_test: bf_test.o binary.o
  208.     $(CC) -o $@ bf_test.o binary.o $(LDFLAGS) $(LIBS)
  209.  
  210. ################################################################
  211.  
  212. install: all $(LASERGNU)
  213.     $(INSTALL_PROGRAM) gnuplot $(bindir)/gnuplot
  214.     test ! -f gnuplot_x11 || $(INSTALL_PROGRAM) gnuplot_x11 $(bindir)/gnuplot_x11
  215.     -$(INSTALL_DATA) $(srcdir)/docs/gnuplot.1 $(mandir)/gnuplot.1
  216.     ( cd docs; $(MAKE) $(MFLAGS) install datadir=$(datadir) )
  217.  
  218. lasergnu_install: lasergnu docs/lasergnu.1
  219.     $(INSTALL_PROGRAM) lasergnu $(bindir)/lasergnu
  220.     $(INSTALL_DATA) $(srcdir)/docs/lasergnu.1 $(mandir)/lasergnu.1
  221.  
  222. lasergnu_noinstall:
  223.  
  224. uninstall:
  225.     rm -f $(bindir)/gnuplot $(bindir)/gnuplot_x11
  226.     rm -f $(mandir)/gnuplot.1 $(mandir)/lasergnu.1
  227.     ( cd docs; $(MAKE) $(MFLAGS) uninstall datadir=$(datadir) )
  228.  
  229. ################################################################
  230. # Dependencies
  231.  
  232. .c.o:
  233.     $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
  234.  
  235. term.o: term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  236.     $(CC) -c -I$(srcdir)/term $(TERMFLAGS) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(srcdir)/term.c
  237.  
  238. version.o:
  239.     $(CC) -c -DCONTACT=\"$(EMAIL)\" $(CPPFLAGS) $(DEFS) $(CFLAGS) $(srcdir)/version.c
  240.  
  241. $(OBJS): plot.h
  242.  
  243. command.o: command.c
  244.     $(CC) -c -DHELPFILE=\"$(datadir)/gnuplot.gih\" $(CPPFLAGS) $(DEFS) $(CFLAGS) $(srcdir)/command.c
  245.  
  246. command.o help.o misc.o: help.h
  247.  
  248. command.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h
  249.  
  250. bitmap.o term.o: bitmap.h
  251.  
  252. ################################################################
  253.  
  254. Makefile: Makefile.in config.status
  255.     $(SHELL) config.status
  256. config.status: configure
  257.     $(SHELL) config.status --recheck
  258. configure: configure.in
  259.     cd $(srcdir); autoconf
  260.  
  261. ################################################################
  262. # Miscellaneous targets
  263.  
  264. SOURCES=plot.h help.h setshow.h bitmap.h term.h $(CSOURCE1) $(CSOURCE2) \
  265.     $(CSOURCE3) $(CSOURCE4) $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)\
  266.     $(CSOURCE8) $(NEXTSRC) $(WINDOWS) $(OS2)
  267.  
  268. DOCS  = $(DOCS1) $(DOCS2) $(DOCS3)
  269.  
  270. clean:
  271.     rm -f gnuplot gnuplot_x11 bf_test *.o core
  272.     ( cd docs; $(MAKE) $(MFLAGS) clean )
  273.     ( cd docs/latextut; $(MAKE) $(MFLAGS) clean )
  274.  
  275. mostlyclean: clean
  276.  
  277. distclean: clean
  278.     rm -f Makefile config.status
  279.  
  280. realclean: distclean
  281.     rm -f TAGS
  282.  
  283. dist: $(ETC) $(SOURCES) $(PC) $(DEMOS) $(BETA) $(DOCS)
  284.     $(TAR) cvf /tmp/gnuplot.tar $(ETC) $(SOURCES) $(PC)\
  285.          $(DEMOS) $(BETA) $(DOCS)
  286.